package com.armani.service;

import com.armani.entity.User;
import com.armani.model.UserModel;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @ProjectName: 用户增删改
 * @Package: com.armani.service
 * @ClassName: UserService
 * @Description: TODO
 * @Author: Roc
 * @Date: 2021/11/27 18:16
 * @Version: 1.0
 **/
public interface UserService {
    /**
     *
     * @param level
     * @param user
     * @param startRow
     * @param limit
     * @return
     */
    List<User> ListSearch(Integer level,
                          String user,
                          Integer startRow,
                          Integer limit);

    /**
     *
     * @param level
     * @param user
     * @return
     */
    Integer getCount(Integer level,String user );


    /**
     * 添加
     * @param userName
     * @param user
     * @param password
     * @param phone
     * @param sex
     * @param cardId
     * @param birth
     * @param email
     * @param createtime
     * @param level
     * @param balance
     * @return
     */
    Integer insert(String userName,String user,
                   String password,String phone,
                   String sex,String cardId,
                   Date birth,String email,
                   Date createtime,Integer level,
                   BigDecimal balance,Integer zhuangtai);


    /**
     * 修改
     * @param userName
     * @param user
     * @param password
     * @param phone
     * @param sex
     * @param cardId
     * @param birth
     * @param email
     * @param createtime
     * @param level
     * @param balance
     * @param id
     * @return
     */
    Integer update(String userName,String user,
                   String password,String phone,
                   String sex,String cardId,
                   Date birth,String email,
                   Date createtime,Integer level,
                   BigDecimal balance,Integer zhuangtai,
                   Integer id);

    /**
     * 删除
     * @param id
     * @return
     */
    Integer delete(Integer id);

    /**
     * 修改用户状态
     * @param zhuangtai
     * @return
     */
    Integer ztupdate(String zhuangtai,Integer id);

    /**
     * 用户登录
     * @param userModel 参数（用户名、密码）
     * @return 当前用户的信息
     */
    User login(UserModel userModel);

    /**
     * 注册
     * @param userModel 参数（用户名、密码、生日等）
     * @return 影响行
     */
    Integer register(UserModel userModel);
}
